When can argv[0] have null ?
        Posted  
        
            by andrew-dufresne
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by andrew-dufresne
        
        
        
        Published on 2010-05-08T13:03:05Z
        Indexed on 
            2010/05/08
            13:08 UTC
        
        
        Read the original article
        Hit count: 258
        
c
What I have understand about passing arguments to main() from command line is that argc has a minimum value of 1 and argv[0] will always have the program name with its path in it.
If arguments are provided at the command line, then argc will have a value greater than one and argv1 to argv[argc-1] will have those arguments.
Now a paragraph at this link says that
argv[0] will be a string containing the program's name or a null string if that is not available.
Now, how and when can argv[0] have null string? I mean program name with its path will always be available so when can it be null?
Writer says that "if that is not available" but when and how it is possible that program name will not be available?
Thanks for your time and support.
Regards
© Stack Overflow or respective owner